/*   1:    */ package org.intellij.images.options.impl;
/*   2:    */ 
/*   3:    */

import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.JDOMExternalizable;
import com.intellij.openapi.util.WriteExternalException;
import org.intellij.images.options.EditorOptions;
import org.intellij.images.options.GridOptions;
import org.intellij.images.options.TransparencyChessboardOptions;
import org.intellij.images.options.ZoomOptions;
import org.jdom.Element;

import java.beans.PropertyChangeSupport;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */
/*   9:    */
/*  10:    */
/*  11:    */
/*  12:    */ 
/*  13:    */ final class EditorOptionsImpl
/*  14:    */   implements EditorOptions, JDOMExternalizable
/*  15:    */ {
/*  16:    */   private final GridOptions a;
/*  17:    */   private final TransparencyChessboardOptions b;
/*  18:    */   private final ZoomOptions c;
/*  19:    */   
/*  20:    */   EditorOptionsImpl(PropertyChangeSupport paramPropertyChangeSupport)
/*  21:    */   {
/*  22: 40 */     this.a = new GridOptionsImpl(paramPropertyChangeSupport);
/*  23: 41 */     this.b = new TransparencyChessboardOptionsImpl(paramPropertyChangeSupport);
/*  24: 42 */     this.c = new ZoomOptionsImpl(paramPropertyChangeSupport);
/*  25:    */   }
/*  26:    */   
/*  27:    */   public GridOptions getGridOptions()
/*  28:    */   {
/*  29: 46 */     return this.a;
/*  30:    */   }
/*  31:    */   
/*  32:    */   public TransparencyChessboardOptions getTransparencyChessboardOptions()
/*  33:    */   {
/*  34: 50 */     return this.b;
/*  35:    */   }
/*  36:    */   
/*  37:    */   public ZoomOptions getZoomOptions()
/*  38:    */   {
/*  39: 54 */     return this.c;
/*  40:    */   }
/*  41:    */   
/*  42:    */   public EditorOptions clone()
/*  43:    */     throws CloneNotSupportedException
/*  44:    */   {
/*  45: 58 */     return (EditorOptions)super.clone();
/*  46:    */   }
/*  47:    */   
/*  48:    */   public void inject(EditorOptions paramEditorOptions)
/*  49:    */   {
/*  50: 62 */     this.a.inject(paramEditorOptions.getGridOptions());
/*  51: 63 */     this.b.inject(paramEditorOptions.getTransparencyChessboardOptions());
/*  52: 64 */     this.c.inject(paramEditorOptions.getZoomOptions());
/*  53:    */   }
/*  54:    */   
/*  55:    */   public boolean setOption(String paramString, Object paramObject)
/*  56:    */   {
/*  57: 68 */     return (this.a.setOption(paramString, paramObject)) || (this.b.setOption(paramString, paramObject)) || (this.c.setOption(paramString, paramObject));
/*  58:    */   }
/*  59:    */   
/*  60:    */   public void readExternal(Element paramElement)
/*  61:    */     throws InvalidDataException
/*  62:    */   {
/*  63: 74 */     ((JDOMExternalizable)this.a).readExternal(paramElement);
/*  64: 75 */     ((JDOMExternalizable)this.b).readExternal(paramElement);
/*  65: 76 */     ((JDOMExternalizable)this.c).readExternal(paramElement);
/*  66:    */   }
/*  67:    */   
/*  68:    */   public void writeExternal(Element paramElement)
/*  69:    */     throws WriteExternalException
/*  70:    */   {
/*  71: 80 */     ((JDOMExternalizable)this.a).writeExternal(paramElement);
/*  72: 81 */     ((JDOMExternalizable)this.b).writeExternal(paramElement);
/*  73: 82 */     ((JDOMExternalizable)this.c).writeExternal(paramElement);
/*  74:    */   }
/*  75:    */   
/*  76:    */   public boolean equals(Object paramObject)
/*  77:    */   {
/*  78: 86 */     if (paramObject == this) {
/*  79: 87 */       return true;
/*  80:    */     }
/*  81: 89 */     if (!(paramObject instanceof EditorOptions)) {
/*  82: 90 */       return false;
/*  83:    */     }
/*  84: 92 */     EditorOptions localEditorOptions = (EditorOptions)paramObject;
/*  85: 93 */     GridOptions localGridOptions = localEditorOptions.getGridOptions();
/*  86: 94 */     TransparencyChessboardOptions localTransparencyChessboardOptions = localEditorOptions.getTransparencyChessboardOptions();
/*  87: 95 */     ZoomOptions localZoomOptions = localEditorOptions.getZoomOptions();
/*  88: 96 */     return (localGridOptions != null) && (localGridOptions.equals(getGridOptions())) && (localTransparencyChessboardOptions != null) && (localTransparencyChessboardOptions.equals(getTransparencyChessboardOptions())) && (localZoomOptions != null) && (localZoomOptions.equals(getZoomOptions()));
/*  89:    */   }
/*  90:    */   
/*  91:    */   public int hashCode()
/*  92:    */   {
/*  93:103 */     int i = this.a != null ? this.a.hashCode() : 0;
/*  94:104 */     i = 29 * i + (this.b != null ? this.b.hashCode() : 0);
/*  95:105 */     i = 29 * i + (this.c != null ? this.c.hashCode() : 0);
/*  96:106 */     return i;
/*  97:    */   }
/*  98:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.options.impl.EditorOptionsImpl

 * JD-Core Version:    0.7.0.1

 */